home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 8 / 008.d81 / edit dabble file (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  2KB  |  60 lines

  1. 1 poke783,peek(783)and254:s=65520:poke53281,1:poke53280,5
  2. 10 open15,8,15
  3. 15 open4,8,4,"0:dabble words,seq,read"
  4. 17 input#4,nu
  5. 18 dimdf$(nu),wd$(nu),s$(nu)
  6. 20 forx=1tonu
  7. 30 input#4,df$(x)
  8. 40 input#4,wd$(x)
  9. 50 input#4,s$(x)
  10. 80 next
  11. 90 close4
  12. 95 close15
  13. 100 forx=1tonu
  14. 105 printchr$(147):print"[144]definition[160]#"x
  15. 110 poke781,3:poke782,0:syss:print"1.  definition:"
  16. 115 lf=36:v=5:h=2:q$=df$(x):gosub3000
  17. 120 poke781,8:poke782,0:syss:print"[144]2.  word:":print:print"  "wd$(x)
  18. 130 poke781,12:poke782,0:syss:print"[144]3.  sentence:"
  19. 135 lf=36:v=14:h=2:q$=s$(x):gosub3000
  20. 160 poke781,20:poke782,0:syss:print"[144]is this correct (y/n)?  [160]";
  21. 170 poke198,0:wait198,1:geta$:ifa$<>"y"anda$<>"n"anda$<>"[217]"anda$<>"[206]"then170
  22. 180 ifa$="y"ora$="[217]"then 260
  23. 190 poke781,20:poke782,0:syss:print"[144]enter number to change - ";
  24. 200 poke198,0:wait198,1:geta$:a=val(a$)
  25. 210 ifa<1ora>3then190
  26. 220 ifa=1thenpoke781,5:poke782,0:syss:inputdf$(x):goto160
  27. 230 ifa=2thenpoke781,10:poke782,0:syss:inputwd$(x):goto160
  28. 240 ifa=3thenpoke781,14:poke782,0:syss:inputs$(x):goto160
  29. 260 next
  30. 900 printchr$(147)
  31. 910 print"one moment, please, while i create"
  32. 920 print"a dabble words file..........":fi$="dabble words"
  33. 1000 open15,8,15,"i0":print#15,"s0:dabble words"
  34. 1005 open4,8,4,"0:"+fi$+",seq,write"
  35. 1010 print#4,nu
  36. 1020 forx=1tonu
  37. 1030 print#4,df$(x)
  38. 1040 print#4,wd$(x)
  39. 1050 print#4,s$(x)
  40. 1080 next
  41. 1090 close4
  42. 1095 close15
  43. 2000 poke781,15:poke782,0:syss:print"'dabble words' has been created on the"
  44. 2010 print"disk.":print:print:print"have fun with your dabble file!"
  45. 2020 end:rem **************************
  46. 2997 :
  47. 2998 rem *** format statements      ***
  48. 2999 :
  49. 3000 iflen(q$)>lfthen 3020
  50. 3010 poke781,v:poke782,h:syss:printq$:return
  51. 3020 yf=0:xf=lf
  52. 3030 ifmid$(q$,xf,1)=chr$(32)thenpoke781,v:poke782,h:syss
  53. 3035 ifmid$(q$,xf,1)=chr$(32)thenprintleft$(q$,xf-1):v=v+1:goto3050
  54. 3040 xf=xf-1:goto3030
  55. 3050 yf=xf+lf:ifyf>len(q$)thenyf=len(q$)-xf
  56. 3060 ifyf<=lfthenpoke781,v:poke782,h:syss:printright$(q$,yf):return
  57. 3070 ifmid$(q$,yf,1)=chr$(32)thenpoke781,v:poke782,h:syss
  58. 3075 ifmid$(q$,yf,1)=chr$(32)thenprintmid$(q$,xf+1,yf-xf):xf=yf:v=v+1:goto3060
  59. 3080 yf=yf-1:goto3070
  60.